{% extends "base.html" %}

{% block class %}space{% endblock %}

{% block main %}
<h3>Image</h3>
<dl>
    {% load thumbnail %}
    {% for labimage in user.labimage_set.all %}
    	{% thumbnail labimage.image 150x150 as thumb%}
    	<img src="{{ thumb }}" width="{{ thumb.width }}" height="{{ thumb.height }}"/>
        <a href="{{ labimage.get_image_url }}">complete</a>
    {% endfor %}

    <dd> 
    <form enctype="multipart/form-data" method="post" action=".">
    <table>
    {{ labimage_form }}
    </table>
    </dd>
</dl>
<h3>File</h3>
<dl>
    {% for labfile in user.labfile_set.all %}
        <a href="{{ labfile.get_file_url }}">{{ labfile.file }}</a>
    {% endfor %}
    <dd>
    <table>
    {{ labfile_form }}
    </table>
    <input type="submit" name="submit" value="Upload" /> 
    </dd>
</dl>
{% endblock %}
